use "~/Desktop/QJPS Replication/Table_1.dta", clear
drop X

gen log_length = log(length)
gen log_features = log(features)

**MODEL 1 - presidentialism, majoritarianism, common law
regress cscore pt_pres pt_maj if log_length != . & log_features != ., r

**MODEL 2 - add length
regress cscore pt_pres pt_maj com_law log_length, r

**MODEL 3 - add features
regress cscore pt_pres pt_maj com_law log_length log_features, r

**MODEL 4 - include parliamentarism and PR variables
regress cscore i.gtm_parl i.gtm_pr if log_length != . & log_features != ., r

**MODEL 5 - add length
regress cscore i.gtm_parl i.gtm_pr com_law log_length, r

**MODEL 6 - add features
regress cscore i.gtm_parl i.gtm_pr com_law log_length log_features, r

*Institutions and Elections Project, https://havardhegre.net/iaep/ 
gen iaep_es2 = iaep_es
replace iaep_es2 = 1 if iaep_es2 == 2 //1 = majoritarian, 3 = PR, 4 = mixed system

**MODEL 7 - add features
regress cscore i.iaep_es2 iaep_eml iaep_ecdl iaep_nee if log_length != . & log_features != ., r

**MODEL 8 - add features
regress cscore i.iaep_es2 iaep_eml iaep_ecdl iaep_nee com_law log_length, r

**MODEL 9 - add features
regress cscore i.iaep_es2 iaep_eml iaep_ecdl iaep_nee com_law log_length log_features, r

